//
//  DDDidLoginView.m
//  ialone
//
//  Created by lanou on 16/1/11.
//  Copyright © 2016年 JasperSong. All rights reserved.
//

#import "DDNoLoginView.h"

@implementation DDNoLoginView



- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    
    if (self) {
        [self addSubviews];
    }
    
    return self;
}

- (void)addSubviews
{
    // 返回
    self.returnButton = [UIButton buttonWithType:(UIButtonTypeCustom)];
    self.returnButton.frame = CGRectMake(10, 30, 34, 34);
    self.returnButton.backgroundColor = [UIColor grayColor];
    self.returnButton.hidden = YES;
    self.returnButton.transform = CGAffineTransformScale(_returnButton.transform, 0.1, 0.1);
    self.returnButton.tag = 7890;
    [self addSubview:self.returnButton];
    
    // 设置
    self.setButton = [UIButton buttonWithType:(UIButtonTypeCustom)];
    self.setButton.frame = CGRectMake(kScreenWidth - self.returnButton.frame.origin.x - self.returnButton.frame.size.width, self.returnButton.frame.origin.y, self.returnButton.frame.size.width, self.returnButton.frame.size.height);
    self.setButton.backgroundColor = [UIColor grayColor];
    self.setButton.hidden = YES;
//    self.setButton.transform = CGAffineTransformScale(_setButton.transform, 0.1, 0.1);
    self.setButton.tag = 7891;
    [self addSubview:self.setButton];
    
    // 头像
    self.headerImageView = [[UIImageView alloc] initWithFrame:CGRectMake((kScreenWidth - kScreenWidth / 3 ) / 2, self.returnButton.frame.origin.y + self.returnButton.frame.size.height + 50, kScreenWidth / 3, kScreenWidth / 3)];
    self.headerImageView.layer.cornerRadius = kScreenWidth / 3 / 2;
    self.headerImageView.layer.masksToBounds = YES;
    [self.headerImageView setImage:[UIImage imageNamed:@"icon"]];
    self.headerImageView.backgroundColor = [UIColor grayColor];
    [self addSubview:self.headerImageView];
    
    // 名字
    self.nameLable = [[UILabel alloc] initWithFrame:CGRectMake(self.headerImageView.frame.origin.x , self.headerImageView.frame.origin.y + self.headerImageView.frame.size.height + 25, self.headerImageView.frame.size.width , 24)];
    self.nameLable.textAlignment = NSTextAlignmentCenter;
    self.nameLable.textColor = [UIColor whiteColor];
    self.nameLable.tag = 1000;
    [self addSubview:self.nameLable];
    
    
    // 消息
    self.messageButton = [UIButton buttonWithType:(UIButtonTypeCustom)];
    self.messageButton.frame = CGRectMake(kScreenWidth / 3, self.nameLable.frame.origin.y + self.nameLable.frame.size.height + 30, kScreenWidth / 3, 50);
   // self.messageButton.backgroundColor = [UIColor greenColor];
    [self addSubview:self.messageButton];
    
    // 收藏
    self.collectButton = [UIButton buttonWithType:(UIButtonTypeCustom)];
    self.collectButton.frame = CGRectMake(kScreenWidth, kScreenHeight/2+30, self.messageButton.frame.size.width, self.messageButton.frame.size.height);
    self.collectButton.tag = 1250;
   // self.collectButton.backgroundColor = [UIColor grayColor];
    [self addSubview:self.collectButton];
    
    // 评论
    self.commentButton = [UIButton buttonWithType:(UIButtonTypeCustom)];
    self.commentButton.frame = CGRectMake(self.collectButton.frame.origin.x, self.collectButton.frame.origin.y + self.collectButton.frame.size.height + 30, self.collectButton.frame.size.width, self.collectButton.frame.size.height);
  //  self.commentButton.backgroundColor = [UIColor grayColor];
    [self addSubview:self.commentButton];

    
    
    
    // 版本
    self.vertionLable = [[UILabel alloc] initWithFrame:CGRectMake((kScreenWidth - 120) / 2, kScreenHeight - 50, 120, 20)];
    // self.vertionLable.backgroundColor = [UIColor grayColor];
    [self addSubview:self.vertionLable];
    
    // 单项空间
   self.owspaceLable = [[UILabel alloc] initWithFrame:CGRectMake((kScreenWidth - (kScreenWidth / 5 + 20)) / 2,kScreenHeight - 120, kScreenWidth / 5 + 20, 40)];
  //  self.backgroundColor = [UIColor greenColor];
    [self addSubview:self.owspaceLable];
    
    
}



/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
